#ifndef _MMAP_H
#define _MMAP_H

#include <string>
#include <stdint.h>

#include "immap.h"

class MMap : public IMMap {
	public:	

	MMap(const std::string& file_name, uint64_t default_alloc = 0);
	virtual ~MMap();

	virtual void *MapRW(uint64_t offset, size_t size);
	virtual void *GetCurrentMap();
	virtual void Unmap();
	virtual bool IsMapped();
	
	private:

	void *mapped_addr_;
	size_t mapped_size_;
	int fd_;
};

#endif // _MMAP_H
